Various charting packages allow developers to represent a set of data values as graphics, for example, as a set of vertical bars, points in a line, wedges of a pie, etc. Charts typically do this by providing a way of transforming data values into x/y coordinates to display on screen, and then using a standard drawing application programming interface (API) to render those data values in a particular way. Most charting packages examine the data being displayed, and automatically determine an appropriate set of ranges for a chart's axes, for example, to guarantee that all data is visible. Often the chart also needs to take into account how the data will be rendered, for example, if a data point will be rendered as a 30 pixel wide square, the transform needs to ensure there is enough space around that data point to accommodate the 30 pixel square.
Some traditional graphics APIs allow developers to use drawing commands that take x/y screen coordinates as parameters. For example, a developer might use the API to draw a box that stretches from the coordinates 20, 20 to 100, 100. A graphics API also typically allows a developer to set up some sort of transformation on the coordinate space into which the developer is drawing, for example, to take all of the coordinates and move them to the right by 100 pixels, or scale the coordinates up by a factor of two.
Some charting packages allow a developer to use a graphics API to draw, customize, or extend a chart. However, such APIs provide drawing and customizing commands that take only screen-based coordinates as parameters and many developers desire to make customization and drawing graphics that are based on data value display positions and other characteristics. Many developers find it difficult, complicated, and time-consuming to deal with the data value to screen coordinate transformations needed to use the existing API graphic drawing commands.
Development is further complicated when data changes, for example, when a change requires changes to a chart's data range, data representations, and added customizations. For example, such a change may require adjusting display customization characteristics. To ensure the data, representations, graphics, and customizations show up as intended, a developer may: (a) make the chart aware of the data so it can be included when automatically determining how data is transformed into screen coordinates; (b) make the chart aware enough of how the data is rendered that it can account for it when automatically determining how data is transformed into screen coordinates, and/or (c) use the chart's extension APIs to transform data into onscreen coordinates. In short, existing charting packages make it complicated and time-consuming to customize a chart, for example, when drawing chart graphics.